package com.usian.exception;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.usian.pojo.Emp;

import java.util.ArrayList;
import java.util.List;

public class GlobalBlockHandler {

    public static List<Emp> findAllBlcok(BlockException e){
        List<Emp> list =new ArrayList<>();
        Emp emp =new Emp();
        emp.setEid(100);
        emp.setEname("sentinel限流返回的托底数据");
        list.add(emp);
        return list;
    }

    public static Emp findByIdBolck(int id,BlockException e){
        return new Emp(id,"全局block限流");
    }
}
